
public class DLLNode {

	//instance variables
	private DLLNode next;
	private DLLNode prev;
	private Record nodeData;

	
	//default constructor
	public DLLNode(){
		next=null;
		prev=null;
		nodeData=null;
	}
	
	 public DLLNode(Record data){
	    super();
	    next=null;
		prev=null;
	    nodeData=data;
	  } // public DLLNode()
	
	//overloaded constructor
	public DLLNode(Record value, DLLNode successor){
		nodeData=value;
		next=successor;
	}
	//accessors
	public DLLNode getNext(){
		return next;
	}
	public DLLNode getPrev(){
		return prev;
	}
	public Record getNodeData(){
		return nodeData;
	}
	//mutators
	public void setNext(DLLNode newNext){
		next=newNext;
	}
	public void setPrev(DLLNode newPrev){
		prev=newPrev;
	}
	public void setNodeData(Record what){
		nodeData=what;
	}
	public String toString(){
		if(nodeData!=null){
			return nodeData.toString();
		}
		else{
		return "Dummy Node";
		}
	}
	
}